package com.yvan.security;

import java.io.Serializable;

/**
 * 认证方式
 * Created by luoyifan on 2017/6/25.
 */
public interface AuthenticationProvider {

    /**
     * 根据用户标识返回认证用户
     */
    Principal get(Serializable id);

    /**
     * 验证用户
     */
    Principal authenticate(Verifier verifier) throws AuthenticationException;
}
